Release 10.1A: OpenEdge Getting Started:
Database Essentials
Blocks
A block is the smallest unit of physical storage in a database. Many types of database blocks are stored inside the database, and most of the work to store these database blocks happens behind the scenes. However, it is helpful to know how blocks are stored so that you can create the best database layout.
The most common database blocks can be divided into three groups:
Data blocks
Data blocks are the most common blocks in the database. There are two types of data blocks: RM blocks and RM chain blocks. The only difference between the two is that RM blocks are considered full and RM chain blocks are not full. The internal structure of the blocks is the same. Both types of RM blocks are social. Social blocks can contain records from different tables. In other words, RM blocks allow table information (records) from multiple tables to be stored in a single block. In contrast, index blocks only contain index data from one index in a single table.
The number of records that can be stored per block is tunable per storage area. See the "Data layout" section for a discussion of calculating optimal records per block settings.
Each RM block contains four types of information:
The block header contains the address of the block (dbkey), the block type, the chain type, a backup counter, the address of the next block, an update counter (used for schema changes), free space pointers, and record pointers. The block header is 16 bytes in length. Each record contains a fragment pointer, which is used by record pointers in individual fields, the Length of the Record field, and the Skip Table field (used to increase field search performance). Each record needs a minimum of 15 bytes for overhead storage and contains a Length field, a Miscellaneous Information field, and data.
Figure 3–2 shows the layout of an RM block.
Figure 3–2: RM Block
![]()
Index blocks
Index blocks have the same 16 bytes of header information as data blocks. Index blocks can store the amount of information that can fit within the block, and that information is compressed for efficiency. As stated earlier, index blocks can only contain information referring to a single index.
Indexes are used to find records in the database quickly. Each index in an OpenEdge RDBMS is a structured B-tree and is always in a compressed format. This improves performance by reducing key comparisons. A database can have up to 32,767 indexes. Each B-tree starts at the root. The root is stored in an
_storageobjectrecord. For the sake of efficiency, indexes are multi-threaded, allowing concurrent access to indexes. Rather than locking the whole B-tree, only those nodes that are required by a process are locked.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |